<extend name="Public/layout"/>
<block name="head">
<link rel="stylesheet" href="__PUBLIC__css/verified.css">
<style type="text/css">
.footer{
    display: none;
}
</style>
</block>
<block name="main">
    <div class="form">
        <div class="form-group">
            <input type="text" name="relaname" id="relaname" placeholder="请输入您的真实姓名">
        </div>
        <div class="form-group">
            <input type="text" name="idcard" id='idcard' placeholder="请输入您的身份证号码">
        </div>
    </div>

    <div class="btn-wrapper">
        <a href="javascript:" onClick='realnmae()'>保存</a>
    </div>
</block>
<block name="js">
    <script type="text/javascript">
        //实名认证
         function realnmae() {
            var realname = $('#relaname').val();
            var idcard = $('#idcard').val();
              if(realname==""||idcard==""){
                    layer.open({
                        content:"请填写完整后提交！"
                        ,skin: 'msg'
                        ,time: 1 //2秒后自动关闭
                    });
                    return false;
              }
                

            $.post('{:U("User/realname")}', {
                realname: realname,
                idcard: idcard
            }, function (res) {
                if (res.err== 1) {
                    location.href="/Home/Person/realname_success"
                } else {
                   // console.log(res);return;
                     location.href="/Home/Person/realname_error/msg/"+res.msg
                }
            })
        }
    </script>
</block>